﻿#region Namespace References

using DynConDevCorp.OpenArch.SmartData.Interfaces;

#endregion

namespace DynConDevCorp.OpenArch.SmartData.Core
{
    /// <summary>
    /// 
    /// </summary>
    public class SmartRule : ISmartRule
    {
    }

    /// <summary>
    /// 
    /// </summary>
    /// <typeparam name="TData">The type of the AT a_ TYPE.</typeparam>
    public class SmartRule<TData> : SmartRule, ISmartRule<TData>
    {
        /// <summary>
        /// Evaluates the specified source.
        /// </summary>
        /// <param name="source">The source.</param>
        /// <param name="proposedValue">The proposed value.</param>
        /// <returns></returns>
        public bool Evaluate(ISmartField source, TData proposedValue)
        {
            if ((bool)source.WriteLocked)
                return false;
            return true;
        }

    }
}